<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>【图】${cmsContent.title} - 果果街妈妈购物分享返利社区</title>
<meta name="keywords" content="果果,果果网,果果街,淘宝网导购,淘宝母婴,母婴用品,母婴产品,母婴网购,怀孕,孕期,婴幼儿,儿童,0-1岁,1-3岁,3-6岁,妈妈购物分享,逛淘宝,童装,童鞋,玩具,早教,启蒙,亲子,亲子装,纸尿裤,奶粉,母婴类美丽说,母婴类蘑菇街,母婴类爱乐活" />
<meta name="description" content="看看妈妈们为宝宝淘到的好东西，参加品牌母婴电商限时高额返利活动，推荐别人购买自己拿佣金，果果街是妈妈分享育儿消费经验，网购省钱的好地方。" />
<%@include file="../common/css.jsp" %>
<link href="../../css/v4/detail.css" type="text/css" rel="stylesheet" />
<%@include file="../common/js.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!-- <script type="text/javascript" src="js/web2/familyTip.js"></script> -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<!--[if ie 6]><script src="../../js/v4/iepng.js" type="text/javascript"></script><![endif]-->
<!--[if ie]><link href="../../css/v4/common/IE.css" type="text/css" rel="stylesheet"><![endif]-->
</head>

<body>
	<!-- head -->
	<%@include file="../common/header.jsp"%>
	<!-- head--end-->
	<!-- body -->
	<div class="w100p pt20 pb35">
		<div class="w980 mg clearfix">
			<div class="dc_left">
				<div class="box_s8 mb25 pb35">
					<div class="tz_box">
						<div class="nav_tip clearfix">
							<div class="rel_info">
								<span>${cmsContent.nickname}</span><span><fmt:formatDate value="${cmsContent.gmtCreated}" pattern="yyyy-MM-dd" /></span>
								<span>浏览：${cmsContent.visitAmout}</span><span>回复：${cmsContent.replyAmout}</span>
							</div>
							<div class="map_nav">
								<a href="">果果街</a><span class="ml5 mr5">>></span><c:if test="${cmsContent.channel!='b9a62576-070f-4c4d-8b8b-22389a8b626e'}" ><a href="amoys.htm">妈妈帮淘>></a></c:if>${cmsContent.title}
							</div>
						</div>
						<div class="tz_det">
							<h1>${cmsContent.title}</h1>
							<div class="content clearfix">${cmsContent.description }</div>
						</div>
					</div>
					<!-- <div class="comment_rel_s1">
						<a href="#"><i class="icon_share"></i>分享</a><a href="#"><i class="icon_revert"></i>回复</a>
					</div> -->
					
					<c:if test="${cmsContent.theme!=''}">
					<div class="comment_rel_s1">
						<!-- <a href="#"><i class="icon_share"></i>分享</a><a href="#"><i class="icon_revert"></i>回复</a> -->
					</div>
					<div class="new_pic_box pt25 pb15 ">
						<c:if test="${cmsContent.theme=='01'}">
	                    	<div class="n_p_head"><a href="/piclshow.htm?discussId=${cmsContent.identifier}" class="def_btn_s2" target="_blank" >马上参加</a>
	                    		<span class="title">最新图片</span>
	                    		<a href="piclshow.htm?discussId=${cmsContent.identifier}" class="more">所有图片</a>
	                    	</div>
                    	</c:if>
                    	<c:if test="${cmsContent.theme=='02'}">
	                    	<div class="n_p_head"><a href="/discussdoing.htm?id=${cmsContent.identifier }" class="def_btn_s2" target="_blank" >马上参加</a>
	                    		<span class="title">最新图片</span>
	                    		<a href="/discussdoing.htm?id=${cmsContent.identifier }" target="_blank" class="more">所有推荐</a>
	                    		
	                    	</div>
                    	</c:if>
                    	<c:if test="${cmsContent.theme=='02'}">
	                        <div class="n_p_det">
		                         <c:forEach items="${cmsContent.pictorialList}" var="proctorial">
				                         <c:forEach items="${proctorial.doingList}" var="doing">
				                         		<c:forEach items="${doing.doingObj.doingProductList }" var="product">
						                            <div class=" box_s14">
						                            	<a href="/discussdoing.htm?id=${cmsContent.identifier}"><img src="${product.imageServer}${product.picThumb}_200x200.jpg" class="block" style="width: 150px;height: 150px;"/></a>
						                                <div class="body">
						                                	<a href="/discussdoing.htm?id=${cmsContent.identifier}" class="title">${product.name}</a>
						                                    <span class="name">${doing.doingObj.memberName}</span>
						                                </div>
						                            </div>
						                        </c:forEach>
						                        
					                        </c:forEach>
			                        </c:forEach>
			                         <br class="clear" />
	                         </div>
                         </c:if>
                         
                         
                         <c:if test="${cmsContent.theme=='01'}">
                         	
	                        <div class="n_p_det">
		                         <c:forEach items="${cmsContent.pictorialList}" var="proctorial" end="7">
		                         	<c:if test="${fn:length(proctorial.doingList)>0}">
						                            <div class=" box_s14">
						                            	<a href="/piclshow.htm?discussId=${cmsContent.identifier}"><img src="${proctorial.doingList[0].doingObj.doingPictureList[0].picUrl}_200x200.jpg" class="block" style="width: 150px;height: 150px;"/></a>
						                                <div class="body">
						                                	<a href="/piclshow.htm?discussId=${cmsContent.identifier}" class="title">${proctorial.pictorialObj.title}</a>
						                                    <span class="name">${proctorial.doingList[0].doingObj.memberName}</span>
						                                </div>
						                            </div>
						             </c:if>
			                        </c:forEach>
			                 <br class="clear" />
	                         </div>
                         </c:if>
                    </div>
					</c:if>
					
					<div class="pl20 pr20">
						<div class="comment_rel_s2">
							<ul class="lay_lr_box">
							<c:forEach items="${commentModel.list}" var="comment">
								<li>
									<div class="l_box">
										<a href="/member/tashare.htm?ta=${comment.member}"><img src="${comment.memberImageServer}${comment.memberAvatar}" class="block" width="30" height="30" /></a>
									</div>
									<div class="r_box">
										<a href="/member/tashare.htm?ta=${comment.member}" class="rev_name">${comment.commentUserName}</a>
										<p class="rev_content">
											${comment.showCommentContent}
										</p>
										<c:if test="${comment.commentPic!=''}">
											<img src="${comment.commentPic}" />
										</c:if>
										<span class="rev_date"><fmt:formatDate
										value="${comment.gmtCreated}" pattern="yyyy-MM-dd" /></span>
									<!-- dianpin--box -->
										<div class="dp_box" id="comment_${comment.identifier}" >
											<div class="dp_link" commentId="${comment.identifier}">
												<a href="javascript:void(0);"><i class="icon_revert"></i>点评</a>
											</div>
										</div> 
										<c:if test="${comment.commentAppBaby[0]!=null}">
										<div class="comment_rel_s2 comment_dp_list">
												<ul class="lay_lr_box">
												<c:forEach items="${comment.commentAppBaby}" var="comComment">
													<li>
														<div class="l_box">
														 <a href="/member/tashare.htm?ta=${comComment.member}"><img src="${comComment.memberImageServer}${comComment.memberAvatar}" class="block" width="30" height="30" /></a>
														</div>
														<div class="r_box">
															<a href="/member/tashare.htm?ta=${comComment.member}" class="rev_name">${comComment.commentUserName}</a>
															<p class="rev_content">${comComment.showCommentContent}</p>
															<div class="dianping">
																<a href="javascript:void(0);" onclick="replyReply('${comComment.commentUserName}');">点评</a>
															</div>
														</div>
													</li>
												</c:forEach>
												</ul>
										</div>
										</c:if>
										<!-- dianpin--box--end -->
									</div>
								</li>
							</c:forEach>
							</ul>
						</div>
					 <!-- fanye -->
							<div class="fanye mt50" id="pager"></div>
						<!-- fanye--end-->
						<!-- comment-revert-->
						
						<c:if test="${cmsContent.isReply}">
						<div class="com_rev_wrap">
							<div class="com_rev_box ">
								<h3>添加回复</h3>
								<div class="rev_area">
									<div id="content_error" class="tip">
										<p >
											还能输入<i>140</i>个字
										</p>
									</div>
									<textarea class="focus" onkeyup="GUOGUO.remain('purple_content','content_error',140)" onkeydown="GUOGUO.remain('purple_content','content_error',140)"title="输入框" id="purple_content"></textarea>
									<div class="comment_else_ope">
										<c:if test="${onlineUser.member!=null }">
											<input type="button" class="def_btn_s5 fr" value="回 复" onclick="replyDis('${cmsContent.tblIdentifier}');" id="replyDis"/> 
										</c:if>
										<c:if test="${onlineUser.member==null }">
											<input type="button" class="def_btn_s5 fr" value="回 复" onclick="GUOGUO.memberLogin();" id="replyDis"/> 
										</c:if>
										<c:if test="${cmsContent.isReplyPic}">
											<c:if test="${onlineUser.member!=null }">
												<a href="javascript:void(0);" onclick="imgUploadComment();">
													<i class="icon_upload"></i>上传图片
												</a>
											</c:if>
											<c:if test="${onlineUser.member==null }">
												<a href="javascript:void(0);" onclick="GUOGUO.memberLogin();">
													<i class="icon_upload"></i>上传图片
												</a>
											</c:if>
										</c:if>
										<%@include file="comface.jsp"%>
									</div>
								</div>
								<div class="com_pic_box">
                                	<ul class="clearfix	"id="comment_list">
                                    </ul>
                                </div>
							</div>
						</div>
						</c:if>
						<!-- comment-revert--end-->
					</div>
					<div class="shadow"></div>
				</div>
			</div>
			 <!-- right-->
            <div class="tz_right">
                <div class="box_s13">
                    <div class="tz_pd_s1">
                  	 <c:forEach items="${rightGuangGao}" var="right" varStatus="rtNum">
                    		<c:if test="${rtNum.index==0 }">
	                        	<div class="r_ad_box mb10">
	                            	<a href="${right.hyperlink }"><img src="${right.picture}" class="block"  style="width: 227px;height: 163px;"/></a>
	                            </div>
                            </c:if>
                            <c:if test="${rtNum.index==1}">
                            <div class="r_ad_box mb10">
                            	<a href="${right.hyperlink }"><img src="${right.picture}" class="block"  style="width: 227px;height: 61px;"/></a>
                            </div>
                            </c:if>
                        </c:forEach>   
                        <div class="tz_pd_s2">
                            <div class="dc_tit_con dc_hot_tags mt25">
                                <h3 class="tit"><a href="#" class="more">>>更多</a>热门标签</h3>
                                <div class="dc_tags_box clearfix">
	                                <c:forEach items="${amoysTagsList}" var="tags">
	                                 	<a href="${tags.hyperlink}" class="tags">${tags.description}</a>
	                                </c:forEach>
                                   
                                </div>
                            </div>
                            
                            <div class="dc_tit_con mt20">
                                <h3 class="tit">热门话题</h3>
	                                <ul class="dc_hot_talk">
		                                <c:forEach items="${lunboList}" var="huati">
		                                    <li>
		                                        <a href="${huati.hyperlink }" class="name">${huati.title}</a>
		                                         <p>#${huati.description}#</p>
		                                    </li>
		                                 </c:forEach>   
	                                </ul>
                            </div>
                        </div>
                        
                    </div>
                    <div class="shadow"></div>
                </div>
            </div>
            <!-- right--end-->
            
		</div>
	</div>
	<%@include file="../common/footer.jsp" %>
	<!-- body--end-->
	<script type="text/javascript">
		//上传图片
		var commentImgList = new ArrayList();
		function imgUploadComment() {
			var size = $("#lb_pic").size();
			if (size < 1) {
				$("body").append('<div id="lb_pic" class="tc_box release_box" style="height:185px;" ></div>');
			}
			$("#lb_pic").load("imgUploadComment.htm").show();
			$.fn.popDiv({
				tcID:"lb_pic",isZZ:false,speed:200,noResize:false
			});	
		}
		//回复
		function replyDis(discussId){
			//alert("22222");
			$("#replyDis").attr("onclick","");
			$.post("savereplydis.htm", {
					'content' : $("#purple_content").val(),
					'commentId':discussId,
					'commentIdType':'discuss',
					'ownerType':'member',
					'commentPic':$("#rcommentPic").attr("src"),
					'type':'reply'
				}, function(data) {
					window.location.href="/discuss.htm?id=${cmsid}";
				});
		}
		//评论弹出
		$(".dp_link").click(function(){
			var commentId = $(this).attr("commentId");
			//alert(commentId);
			var comment = $("#comment_"+commentId);
			if(comment.find(".input_area").size() < 1){
				comment.append('<div class="input_area" id="input_area_'+commentId+'" style="display: none;" ><textarea class="focus" id="content_'+commentId+'"></textarea> <div class="comment_else_ope"><input type="button" class="def_btn_s4 fr" value="评论" onclick="comComment('+commentId+');" id="button_'+commentId+'"/><br class="clear"/></div><i class="icon_triangle"></i></div>');
			}
			if(comment.find(".input_area").is(":hidden")){
				$("#input_area_"+commentId).show();
				$("#content_"+commentId).val("");
			}else{
				$("#input_area_"+commentId).hide();
				$("#content_"+commentId).val("");
			}
		}); 
		//回复的回复
		function comComment(commentId){
			$("#button_"+commentId).attr("onclick","");
			var content =$("#content_"+commentId).val();
			$.post("savecomment.htm", {
				'content' : content,
				'commentId':commentId,
				'commentIdType':'comDiscuss',
				'ownerType':'member',
				'replyCommentId':commentId
			}, function(data) {
				window.location.href="/discuss.htm?id=${cmsid}";
			});
		}
		//回复的回复再回复
	
		 function replyReply(nickname){
				var commentId = $(".dp_link").attr("commentId");
				//alert(commentId);
				var comment = $("#comment_"+commentId);
				if(comment.find(".input_area").size() < 1){
					comment.append('<div class="input_area" id="input_area_'+commentId+'" style="display: none;" ><textarea class="focus" id="content_'+commentId+'"></textarea> <div class="comment_else_ope"><input type="button" class="def_btn_s4 fr" value="评论" onclick="comComment('+commentId+');" id="button_'+commentId+'"/><br class="clear"/></div><i class="icon_triangle"></i></div>');
				}
				$("#content_"+commentId).val("回复@"+nickname+"：");
				if(comment.find(".input_area").is(":hidden")){
					$("#input_area_"+commentId).show();
				}
			}
		
		//商品展示底层页
		function onceJion(themeStyle){
			if(themeStyle=='01'){
				//图片
			}else if(themeStyle=='02'){
				//商品
				window.location.href="/prdlshow.htm";
			}
			
		}
		$(function(){
			$("#pager").pager({
				pagenumber : "${commentModel.currentPage}",
				pagecount : "${commentModel.totalPage}",
				buttonClickCallback : function(page) {
					location.href = "/piclshow.htm?id=${ccid}&page="+ page;
				}
			});
		});
	</script>
</body>
</html>
